package com.dirsir.service.imp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dirsir.dao.MerchantDao;
import com.dirsir.entities.Merchant;
import com.dirsir.service.MerchantService;

@Service
public class MerchantServiceImp  implements MerchantService{
	@Autowired
	private MerchantDao merchantDao;
	@Transactional(readOnly=true)
	@Override
	public Merchant getMerchantById(Integer merchantId) {
		return this.merchantDao.getMerchantById(merchantId);
	}
	/*@Override
	public List<MerchantRepertory> getMerchantRepertoryByMerchant(Merchant merchant) {
		return this.merchantDao.getMerchantRepertoryByMerchant(merchant);
	}*/
	@Transactional(readOnly=true)
	@Override
	public Merchant doLoginByAccountAndPassword(String account, String passWord) {
		return this.merchantDao.getLoginByUserNameAndPassword(account, passWord);
	}

}
